/***********************************************************************
 * Module:  ClavierVirtuel.java
 * Author:  Fabien Muguet
 * Purpose: Defines the Class ClavierVirtuel
 ***********************************************************************/

package vue.composants;

public class ClavierVirtuel extends javax.swing.JPanel {

    private int tailleMax;

    private ClavierVirtuelEcouteur ecouteur;
    private String msg;
    private Boolean min;

    
    public ClavierVirtuel(ClavierVirtuelEcouteur ecouteur, int tailleMax) {
        this.ecouteur = ecouteur;
        this.tailleMax = tailleMax;
        initComponents();
        initialiser("");
    }

    public void initialiser(String message) {
        msg = new String(message);
        min = false;
        labTexte.setText(msg);
    }


    public String getMessage() {
        return new String(msg);
    }

    private void btnValideActionPerformed(java.awt.event.ActionEvent evt) {
        ecouteur.saisieValidee( new String(msg) );
    }

    private void btnAnnulerActionPerformed(java.awt.event.ActionEvent evt) {
        ecouteur.saisieAnnulee();
    }


    /**
     * Rustine pour que le clavier prenne en compte la taille maximum de la chaine.
     */
    private void verifierTailleMaxi() {

//        System.out.println("taille max = " + tailleMax);
//        System.out.println("msg.length() = " + msg.length());

        if( msg.length() > tailleMax ) {
            msg = msg.substring(0, (this.msg.length()-1));
            labTexte.setText(msg);
        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    private void initComponents() {

        btnA = new javax.swing.JButton();
        btnZ = new javax.swing.JButton();
        btnE = new javax.swing.JButton();
        btnR = new javax.swing.JButton();
        btnT = new javax.swing.JButton();
        btnY = new javax.swing.JButton();
        btnU = new javax.swing.JButton();
        btnI = new javax.swing.JButton();
        btnO = new javax.swing.JButton();
        btnP = new javax.swing.JButton();
        btnQ = new javax.swing.JButton();
        btnS = new javax.swing.JButton();
        btnD = new javax.swing.JButton();
        btnF = new javax.swing.JButton();
        btnG = new javax.swing.JButton();
        btnH = new javax.swing.JButton();
        btnJ = new javax.swing.JButton();
        btnK = new javax.swing.JButton();
        btnL = new javax.swing.JButton();
        btnM = new javax.swing.JButton();
        btnPoint = new javax.swing.JButton();
        btnN = new javax.swing.JButton();
        btnVirgule = new javax.swing.JButton();
        btnV = new javax.swing.JButton();
        btnB = new javax.swing.JButton();
        btnX = new javax.swing.JButton();
        btnC = new javax.swing.JButton();
        btnW = new javax.swing.JButton();
        btnExclamation = new javax.swing.JButton();
        btnInterrogation = new javax.swing.JButton();
        btn9 = new javax.swing.JButton();
        btn1 = new javax.swing.JButton();
        btn0 = new javax.swing.JButton();
        btn8 = new javax.swing.JButton();
        btn5 = new javax.swing.JButton();
        btn4 = new javax.swing.JButton();
        btn3 = new javax.swing.JButton();
        btn2 = new javax.swing.JButton();
        btn7 = new javax.swing.JButton();
        btn6 = new javax.swing.JButton();
        labTexte = new javax.swing.JLabel();
        btnEspace = new javax.swing.JButton();
        btnMaj = new javax.swing.JToggleButton();
        btnApostrophe = new javax.swing.JButton();
        btnEfface = new javax.swing.JButton();
        btnValide = new javax.swing.JButton();
        btnAnnuler = new javax.swing.JButton();

        setPreferredSize(new java.awt.Dimension(630, 240));

        btnA.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnA.setText("A");
        btnA.setMaximumSize(new java.awt.Dimension(50, 30));
        btnA.setMinimumSize(new java.awt.Dimension(50, 30));
        btnA.setPreferredSize(new java.awt.Dimension(50, 30));
        btnA.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnZ.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnZ.setText("Z");
        btnZ.setMaximumSize(new java.awt.Dimension(50, 30));
        btnZ.setMinimumSize(new java.awt.Dimension(50, 30));
        btnZ.setPreferredSize(new java.awt.Dimension(50, 30));
        btnZ.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnZActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnE.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnE.setText("E");
        btnE.setMaximumSize(new java.awt.Dimension(50, 30));
        btnE.setMinimumSize(new java.awt.Dimension(50, 30));
        btnE.setPreferredSize(new java.awt.Dimension(50, 30));
        btnE.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnR.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnR.setText("R");
        btnR.setMaximumSize(new java.awt.Dimension(50, 30));
        btnR.setMinimumSize(new java.awt.Dimension(50, 30));
        btnR.setPreferredSize(new java.awt.Dimension(50, 30));
        btnR.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnT.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnT.setText("T");
        btnT.setMaximumSize(new java.awt.Dimension(50, 30));
        btnT.setMinimumSize(new java.awt.Dimension(50, 30));
        btnT.setPreferredSize(new java.awt.Dimension(50, 30));
        btnT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnY.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnY.setText("Y");
        btnY.setMaximumSize(new java.awt.Dimension(50, 30));
        btnY.setMinimumSize(new java.awt.Dimension(50, 30));
        btnY.setPreferredSize(new java.awt.Dimension(50, 30));
        btnY.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnYActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnU.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnU.setText("U");
        btnU.setMaximumSize(new java.awt.Dimension(50, 30));
        btnU.setMinimumSize(new java.awt.Dimension(50, 30));
        btnU.setPreferredSize(new java.awt.Dimension(50, 30));
        btnU.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnUActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnI.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnI.setText("I");
        btnI.setMaximumSize(new java.awt.Dimension(50, 30));
        btnI.setMinimumSize(new java.awt.Dimension(50, 30));
        btnI.setPreferredSize(new java.awt.Dimension(50, 30));
        btnI.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnIActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnO.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnO.setText("0");
        btnO.setMaximumSize(new java.awt.Dimension(50, 30));
        btnO.setMinimumSize(new java.awt.Dimension(50, 30));
        btnO.setPreferredSize(new java.awt.Dimension(50, 30));
        btnO.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnOActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnP.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnP.setText("P");
        btnP.setMaximumSize(new java.awt.Dimension(50, 30));
        btnP.setMinimumSize(new java.awt.Dimension(50, 30));
        btnP.setPreferredSize(new java.awt.Dimension(50, 30));
        btnP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnQ.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnQ.setText("Q");
        btnQ.setMaximumSize(new java.awt.Dimension(50, 30));
        btnQ.setMinimumSize(new java.awt.Dimension(50, 30));
        btnQ.setPreferredSize(new java.awt.Dimension(50, 30));
        btnQ.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnQActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnS.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnS.setText("S");
        btnS.setMaximumSize(new java.awt.Dimension(50, 30));
        btnS.setMinimumSize(new java.awt.Dimension(50, 30));
        btnS.setPreferredSize(new java.awt.Dimension(50, 30));
        btnS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnD.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnD.setText("D");
        btnD.setMaximumSize(new java.awt.Dimension(50, 30));
        btnD.setMinimumSize(new java.awt.Dimension(50, 30));
        btnD.setPreferredSize(new java.awt.Dimension(50, 30));
        btnD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnF.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnF.setText("F");
        btnF.setMaximumSize(new java.awt.Dimension(50, 30));
        btnF.setMinimumSize(new java.awt.Dimension(50, 30));
        btnF.setPreferredSize(new java.awt.Dimension(50, 30));
        btnF.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnG.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnG.setText("G");
        btnG.setMaximumSize(new java.awt.Dimension(50, 30));
        btnG.setMinimumSize(new java.awt.Dimension(50, 30));
        btnG.setPreferredSize(new java.awt.Dimension(50, 30));
        btnG.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnH.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnH.setText("H");
        btnH.setMaximumSize(new java.awt.Dimension(50, 30));
        btnH.setMinimumSize(new java.awt.Dimension(50, 30));
        btnH.setPreferredSize(new java.awt.Dimension(50, 30));
        btnH.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnHActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnJ.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnJ.setText("J");
        btnJ.setMaximumSize(new java.awt.Dimension(50, 30));
        btnJ.setMinimumSize(new java.awt.Dimension(50, 30));
        btnJ.setPreferredSize(new java.awt.Dimension(50, 30));
        btnJ.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnJActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnK.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnK.setText("K");
        btnK.setMaximumSize(new java.awt.Dimension(50, 30));
        btnK.setMinimumSize(new java.awt.Dimension(50, 30));
        btnK.setPreferredSize(new java.awt.Dimension(50, 30));
        btnK.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnKActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnL.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnL.setText("L");
        btnL.setMaximumSize(new java.awt.Dimension(50, 30));
        btnL.setMinimumSize(new java.awt.Dimension(50, 30));
        btnL.setPreferredSize(new java.awt.Dimension(50, 30));
        btnL.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnM.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnM.setText("M");
        btnM.setMaximumSize(new java.awt.Dimension(50, 30));
        btnM.setMinimumSize(new java.awt.Dimension(50, 30));
        btnM.setPreferredSize(new java.awt.Dimension(50, 30));
        btnM.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnPoint.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnPoint.setText(".");
        btnPoint.setMaximumSize(new java.awt.Dimension(50, 30));
        btnPoint.setMinimumSize(new java.awt.Dimension(50, 30));
        btnPoint.setPreferredSize(new java.awt.Dimension(50, 30));
        btnPoint.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPointActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnN.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnN.setText("N");
        btnN.setMaximumSize(new java.awt.Dimension(50, 30));
        btnN.setMinimumSize(new java.awt.Dimension(50, 30));
        btnN.setPreferredSize(new java.awt.Dimension(50, 30));
        btnN.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnVirgule.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnVirgule.setText(",");
        btnVirgule.setMaximumSize(new java.awt.Dimension(50, 30));
        btnVirgule.setMinimumSize(new java.awt.Dimension(50, 30));
        btnVirgule.setPreferredSize(new java.awt.Dimension(50, 30));
        btnVirgule.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVirguleActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnV.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnV.setText("V");
        btnV.setMaximumSize(new java.awt.Dimension(50, 30));
        btnV.setMinimumSize(new java.awt.Dimension(50, 30));
        btnV.setPreferredSize(new java.awt.Dimension(50, 30));
        btnV.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnB.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnB.setText("B");
        btnB.setMaximumSize(new java.awt.Dimension(50, 30));
        btnB.setMinimumSize(new java.awt.Dimension(50, 30));
        btnB.setPreferredSize(new java.awt.Dimension(50, 30));
        btnB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnX.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnX.setText("X");
        btnX.setMaximumSize(new java.awt.Dimension(50, 30));
        btnX.setMinimumSize(new java.awt.Dimension(50, 30));
        btnX.setPreferredSize(new java.awt.Dimension(50, 30));
        btnX.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnXActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnC.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnC.setText("C");
        btnC.setMaximumSize(new java.awt.Dimension(50, 30));
        btnC.setMinimumSize(new java.awt.Dimension(50, 30));
        btnC.setPreferredSize(new java.awt.Dimension(50, 30));
        btnC.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnW.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnW.setText("W");
        btnW.setMaximumSize(new java.awt.Dimension(50, 30));
        btnW.setMinimumSize(new java.awt.Dimension(50, 30));
        btnW.setPreferredSize(new java.awt.Dimension(50, 30));
        btnW.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnWActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnExclamation.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnExclamation.setText("!");
        btnExclamation.setMaximumSize(new java.awt.Dimension(50, 30));
        btnExclamation.setMinimumSize(new java.awt.Dimension(50, 30));
        btnExclamation.setPreferredSize(new java.awt.Dimension(50, 30));
        btnExclamation.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExclamationActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnInterrogation.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnInterrogation.setText("?");
        btnInterrogation.setMaximumSize(new java.awt.Dimension(50, 30));
        btnInterrogation.setMinimumSize(new java.awt.Dimension(50, 30));
        btnInterrogation.setPreferredSize(new java.awt.Dimension(50, 30));
        btnInterrogation.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnInterrogationActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btn9.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btn9.setText("9");
        btn9.setMaximumSize(new java.awt.Dimension(50, 30));
        btn9.setMinimumSize(new java.awt.Dimension(50, 30));
        btn9.setPreferredSize(new java.awt.Dimension(50, 30));
        btn9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn9ActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btn1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btn1.setText("1");
        btn1.setMaximumSize(new java.awt.Dimension(50, 30));
        btn1.setMinimumSize(new java.awt.Dimension(50, 30));
        btn1.setPreferredSize(new java.awt.Dimension(50, 30));
        btn1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn1ActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btn0.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btn0.setText("0");
        btn0.setMaximumSize(new java.awt.Dimension(50, 30));
        btn0.setMinimumSize(new java.awt.Dimension(50, 30));
        btn0.setPreferredSize(new java.awt.Dimension(50, 30));
        btn0.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn0ActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btn8.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btn8.setText("8");
        btn8.setMaximumSize(new java.awt.Dimension(50, 30));
        btn8.setMinimumSize(new java.awt.Dimension(50, 30));
        btn8.setPreferredSize(new java.awt.Dimension(50, 30));
        btn8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn8ActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btn5.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btn5.setText("5");
        btn5.setMaximumSize(new java.awt.Dimension(50, 30));
        btn5.setMinimumSize(new java.awt.Dimension(50, 30));
        btn5.setPreferredSize(new java.awt.Dimension(50, 30));
        btn5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn5ActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btn4.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btn4.setText("4");
        btn4.setMaximumSize(new java.awt.Dimension(50, 30));
        btn4.setMinimumSize(new java.awt.Dimension(50, 30));
        btn4.setPreferredSize(new java.awt.Dimension(50, 30));
        btn4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn4ActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btn3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btn3.setText("3");
        btn3.setMaximumSize(new java.awt.Dimension(50, 30));
        btn3.setMinimumSize(new java.awt.Dimension(50, 30));
        btn3.setPreferredSize(new java.awt.Dimension(50, 30));
        btn3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn3ActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btn2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btn2.setText("2");
        btn2.setMaximumSize(new java.awt.Dimension(50, 30));
        btn2.setMinimumSize(new java.awt.Dimension(50, 30));
        btn2.setPreferredSize(new java.awt.Dimension(50, 30));
        btn2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn2ActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btn7.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btn7.setText("7");
        btn7.setMaximumSize(new java.awt.Dimension(50, 30));
        btn7.setMinimumSize(new java.awt.Dimension(50, 30));
        btn7.setPreferredSize(new java.awt.Dimension(50, 30));
        btn7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn7ActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btn6.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btn6.setText("6");
        btn6.setMaximumSize(new java.awt.Dimension(50, 30));
        btn6.setMinimumSize(new java.awt.Dimension(50, 30));
        btn6.setPreferredSize(new java.awt.Dimension(50, 30));
        btn6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn6ActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        labTexte.setBackground(new java.awt.Color(255, 255, 255));
        labTexte.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        labTexte.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        labTexte.setOpaque(true);

        btnEspace.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnEspace.setMaximumSize(new java.awt.Dimension(50, 30));
        btnEspace.setMinimumSize(new java.awt.Dimension(50, 30));
        btnEspace.setPreferredSize(new java.awt.Dimension(50, 30));
        btnEspace.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEspaceActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnMaj.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnMaj.setSelected(true);
        btnMaj.setText("MAJ");
        btnMaj.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMajActionPerformed(evt);
            }
        });

        btnApostrophe.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnApostrophe.setText("'");
        btnApostrophe.setMaximumSize(new java.awt.Dimension(50, 30));
        btnApostrophe.setMinimumSize(new java.awt.Dimension(50, 30));
        btnApostrophe.setPreferredSize(new java.awt.Dimension(50, 30));
        btnApostrophe.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnApostropheActionPerformed(evt);
                verifierTailleMaxi();
            }
        });

        btnEfface.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnEfface.setText("<--");
        btnEfface.setMaximumSize(new java.awt.Dimension(50, 30));
        btnEfface.setMinimumSize(new java.awt.Dimension(50, 30));
        btnEfface.setPreferredSize(new java.awt.Dimension(50, 30));
        btnEfface.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEffaceActionPerformed(evt);
            }
        });

        btnValide.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnValide.setText("Valider");
        btnValide.setMaximumSize(new java.awt.Dimension(50, 30));
        btnValide.setMinimumSize(new java.awt.Dimension(50, 30));
        btnValide.setPreferredSize(new java.awt.Dimension(50, 30));
        btnValide.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnValideActionPerformed(evt);
            }
        });

        btnAnnuler.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnAnnuler.setText("Annuler");
        btnAnnuler.setMaximumSize(new java.awt.Dimension(50, 30));
        btnAnnuler.setMinimumSize(new java.awt.Dimension(50, 30));
        btnAnnuler.setPreferredSize(new java.awt.Dimension(50, 30));
        btnAnnuler.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAnnulerActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addComponent(btnW, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnX, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnC, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnV, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnB, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnN, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnVirgule, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnPoint, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnInterrogation, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnExclamation, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnApostrophe, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(11, 11, 11))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(btnMaj, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnEspace, javax.swing.GroupLayout.PREFERRED_SIZE, 292, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnValide, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnAnnuler, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(105, 105, 105))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(btnQ, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnS, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnF, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnG, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnH, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(btnJ, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(btnA, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnZ, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnE, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnR, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnT, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnY, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnU, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(btnI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnO, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnP, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(btnK, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnL, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnM, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(labTexte, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                .addComponent(btn0, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btn1, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btn2, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btn3, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btn4, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btn5, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btn6, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btn7, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(5, 5, 5)
                                .addComponent(btn8, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btn9, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnEfface, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(labTexte, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
                    .addComponent(btnEfface, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btn0, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn3, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn4, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn5, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn6, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn7, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn8, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn9, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnA, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnZ, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnE, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnR, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnT, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnY, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnU, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnI, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnO, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnP, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnQ, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnS, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnD, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnF, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnG, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnH, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnJ, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnK, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnL, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnM, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnW, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnX, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnC, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnV, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnB, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnN, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnVirgule, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnPoint, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnInterrogation, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnExclamation, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnApostrophe, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnValide, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btnAnnuler, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addContainerGap())
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(btnEspace, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btnMaj, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(37, 37, 37))))
        );
    }// </editor-fold>

    private void btnAActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "a";
        else this.msg += "A";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnZActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "z";
        else this.msg += "Z";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnEActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "e";
        else this.msg += "E";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnRActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "r";
        else this.msg += "R";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnTActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "t";
        else this.msg += "T";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnYActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "y";
        else this.msg += "Y";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnUActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "u";
        else this.msg += "U";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnIActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "i";
        else this.msg += "I";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnOActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "o";
        else this.msg += "O";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnPActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "p";
        else this.msg += "P";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnQActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "q";
        else this.msg += "Q";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnSActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "s";
        else this.msg += "S";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnDActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "d";
        else this.msg += "D";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnFActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "f";
        else this.msg += "F";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnGActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "g";
        else this.msg += "G";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnHActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "h";
        else this.msg += "H";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnJActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "j";
        else this.msg += "J";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnKActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "k";
        else this.msg += "K";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnLActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "l";
        else this.msg += "L";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnMActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "m";
        else this.msg += "M";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnPointActionPerformed(java.awt.event.ActionEvent evt) {
        this.msg += ".";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnNActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "n";
        else this.msg += "N";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnVirguleActionPerformed(java.awt.event.ActionEvent evt) {
        this.msg += ",";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnVActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "v";
        else this.msg += "V";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnBActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "b";
        else this.msg += "B";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnXActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "x";
        else this.msg += "X";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnCActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "c";
        else this.msg += "C";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnWActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true) this.msg += "w";
        else this.msg += "W";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnExclamationActionPerformed(java.awt.event.ActionEvent evt) {
        this.msg += "!";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnInterrogationActionPerformed(java.awt.event.ActionEvent evt) {
        this.msg += "?";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btn9ActionPerformed(java.awt.event.ActionEvent evt) {
        this.msg += "9";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btn1ActionPerformed(java.awt.event.ActionEvent evt) {
        this.msg += "1";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btn0ActionPerformed(java.awt.event.ActionEvent evt) {
        this.msg += "0";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btn8ActionPerformed(java.awt.event.ActionEvent evt) {
        this.msg += "8";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btn5ActionPerformed(java.awt.event.ActionEvent evt) {
        this.msg += "5";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btn4ActionPerformed(java.awt.event.ActionEvent evt) {
        this.msg += "4";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btn3ActionPerformed(java.awt.event.ActionEvent evt) {
        this.msg += "3";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btn2ActionPerformed(java.awt.event.ActionEvent evt) {
        this.msg += "2";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btn7ActionPerformed(java.awt.event.ActionEvent evt) {
        this.msg += "7";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btn6ActionPerformed(java.awt.event.ActionEvent evt) {
        this.msg += "6";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnEspaceActionPerformed(java.awt.event.ActionEvent evt) {
        this.msg += " ";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnMajActionPerformed(java.awt.event.ActionEvent evt) {
        if (min==true)
        {
            min = false;
            this.btnA.setText("A");
            this.btnB.setText("B");
            this.btnC.setText("C");
            this.btnD.setText("D");
            this.btnE.setText("E");
            this.btnF.setText("F");
            this.btnG.setText("G");
            this.btnH.setText("H");
            this.btnI.setText("I");
            this.btnJ.setText("J");
            this.btnK.setText("K");
            this.btnL.setText("L");
            this.btnM.setText("M");
            this.btnN.setText("N");
            this.btnO.setText("O");
            this.btnP.setText("P");
            this.btnQ.setText("Q");
            this.btnR.setText("R");
            this.btnS.setText("S");
            this.btnT.setText("T");
            this.btnU.setText("U");
            this.btnV.setText("V");
            this.btnW.setText("W");
            this.btnX.setText("X");
            this.btnY.setText("Y");
            this.btnZ.setText("Z");
            this.repaint();
        }
        else
        {
            min = true;
            this.btnA.setText("a");
            this.btnB.setText("b");
            this.btnC.setText("c");
            this.btnD.setText("d");
            this.btnE.setText("e");
            this.btnF.setText("f");
            this.btnG.setText("g");
            this.btnH.setText("h");
            this.btnI.setText("i");
            this.btnJ.setText("j");
            this.btnK.setText("k");
            this.btnL.setText("l");
            this.btnM.setText("m");
            this.btnN.setText("n");
            this.btnO.setText("o");
            this.btnP.setText("v");
            this.btnQ.setText("q");
            this.btnR.setText("r");
            this.btnS.setText("s");
            this.btnT.setText("t");
            this.btnU.setText("u");
            this.btnV.setText("v");
            this.btnW.setText("w");
            this.btnX.setText("x");
            this.btnY.setText("y");
            this.btnZ.setText("z");
            this.repaint();
        }
    }

    private void btnApostropheActionPerformed(java.awt.event.ActionEvent evt) {
        this.msg += "'";
        this.labTexte.setText(msg);
        this.repaint();
    }

    private void btnEffaceActionPerformed(java.awt.event.ActionEvent evt) {
        if( !msg.equals("") ) {
            this.msg = this.msg.substring(0, (this.msg.length()-1));
            this.labTexte.setText(msg);
            this.repaint();
        }
    }

    // Variables declaration - do not modify
    private javax.swing.JButton btn0;
    private javax.swing.JButton btn1;
    private javax.swing.JButton btn2;
    private javax.swing.JButton btn3;
    private javax.swing.JButton btn4;
    private javax.swing.JButton btn5;
    private javax.swing.JButton btn6;
    private javax.swing.JButton btn7;
    private javax.swing.JButton btn8;
    private javax.swing.JButton btn9;
    private javax.swing.JButton btnA;
    private javax.swing.JButton btnAnnuler;
    private javax.swing.JButton btnApostrophe;
    private javax.swing.JButton btnB;
    private javax.swing.JButton btnC;
    private javax.swing.JButton btnD;
    private javax.swing.JButton btnE;
    private javax.swing.JButton btnEfface;
    private javax.swing.JButton btnEspace;
    private javax.swing.JButton btnExclamation;
    private javax.swing.JButton btnF;
    private javax.swing.JButton btnG;
    private javax.swing.JButton btnH;
    private javax.swing.JButton btnI;
    private javax.swing.JButton btnInterrogation;
    private javax.swing.JButton btnJ;
    private javax.swing.JButton btnK;
    private javax.swing.JButton btnL;
    private javax.swing.JButton btnM;
    private javax.swing.JToggleButton btnMaj;
    private javax.swing.JButton btnN;
    private javax.swing.JButton btnO;
    private javax.swing.JButton btnP;
    private javax.swing.JButton btnPoint;
    private javax.swing.JButton btnQ;
    private javax.swing.JButton btnR;
    private javax.swing.JButton btnS;
    private javax.swing.JButton btnT;
    private javax.swing.JButton btnU;
    private javax.swing.JButton btnV;
    private javax.swing.JButton btnValide;
    private javax.swing.JButton btnVirgule;
    private javax.swing.JButton btnW;
    private javax.swing.JButton btnX;
    private javax.swing.JButton btnY;
    private javax.swing.JButton btnZ;
    private javax.swing.JLabel labTexte;
}